#if !defined(ximera_gui_cegui_combobox_hpp)
#define ximera_gui_cegui_combobox_hpp

// -----------------------------------------------------------

#include <ximera/gui/icombobox.hpp>
#include <ximera/gui/cegui/windowtemplate.hpp>

#include <elements/CEGUICombobox.h>
#include <elements/CEGUIListboxTextItem.h>

namespace ximera { namespace gui { namespace cegui
{
    class XIMERA_PLUGIN_API Combobox : public WindowTemplate<ICombobox>
    {
    public:
        Combobox(CEGUI::Combobox* ceguiCombobox)
            : WindowTemplate<ICombobox>(ceguiCombobox) {}
        
        virtual UInt32 itemCount() const;

        virtual void addItem(String const& text);
        virtual void removeItem(UInt32 index);
        virtual void removeAllItems();

        virtual Int32 selectedIndex() const;

        virtual bool readOnly() const;
        virtual void readOnly(bool value);

        virtual bool isDroppedDown() const;
        virtual void showDropDownList();
        virtual void hideDropDownList();

        CEGUI::Combobox* ceguiCombobox() const { return static_cast<CEGUI::Combobox*>(_ceguiWindow); }
    };
}}}

// -----------------------------------------------------------

#endif
